home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ultra Utilities
/
Ultra Utilities (NMV)(1993).iso
/
dfue
/
comx42
/
comx.txt
< prev
next >
Wrap
Text File
|
1991-09-14
|
137KB
|
2,831 lines
COMX
Version 4.2
Copyright (C) 1990-1991 Samuel A. Sholl
6410 Romford Road
Madison, WI 53711
608-277-1661
LICENSE AND REGISTRATION
All versions of COMX, from Version 4.21 on, are NOT Public
Domain software nor are they Free software. Currently, COMX is a
SHAREWARE program and requires the user to register the program
if he or she intends to use it except for the purpose of limited
evaluation described below. Registration grants the user a
license to use COMX on a single computer at any one time.
Non-registered users are granted a limited license to use COMX on
a trial basis for the purpose of evaluation and determining if
COMX is suitable for their needs. Use of COMX, except for this
limited purpose, requires the user to register the product.
All users of the SHAREWARE version of COMX are granted
limited license to copy the product only for the trial use by
others, subject to the above limitations, provided that COMX is
copied in its full and unmodified form. That is, the copy must
include all files necessary to permit full operation of the
program, this license agreement, registration form and full
documentation. No fee, charge, license, warranty, registration
obligation or other compensation of any kind may be accepted by
the donor or recipient in exchange for a copy of COMX.
Operators of Electronic Bulletin Board Systems (BBS Sysops)
may permit the SHAREWARE version of COMX to be downloaded by any
user, and any user may be permitted to upload a copy of COMX to a
BBS, with the Sysop's permission, provided the above conditions
are met.
Use of non-registered copies of COMX by any person in
connection with a business, corporation, educational
establishment or government agency is forbidden. Such users must
register the product and/or purchase a site license agreement.
Registration of COMX licenses you to use the product on a
regular basis and entitles you to receive notification of
bug-fixes, enhancements, extensions, upgrades etc. and product
technical support relating to the use and application of COMX.
Registration covers the use of the product, by the
registered user only, and provides you with the latest version of
COMX on disk and a complete, more comprehensive printed copy of
the user manual.
As a registered user, you will be notified of future COMX
upgrades and revisions and offered the opportunity to acquire
them at a preferred rate and also, for a limited time, you will
be provided with minor upgrades, bug-fixes etc. free of charge.
Shareware is copyrighted by its author and cannot be
distributed without the author's permission. The author retains
all rights (unlike Public Domain software) to a shareware program
and can make changes to it, or withdraw it from public use as he
or she wishes. The distribution of shareware is encouraged by the
author so that others may evaluate it and determine if it meets
their needs, use of which beyond a reasonable evaluation period
requires the user to register his or her copy of the program.
September 14, 1991
Samuel A. Sholl
6410 Romford Rd.
Madison, WI 53711 CONTENTS Page
1. OVERVIEW AND HISTORY OF DEVELOPMENT . . . . . . . . . . . 1
2. INFORMATION ON THE NOTATION IN THIS DOCUMENT AND ON COMX
MENU AND KEYBOARD USAGE . . . . . . . . . . . . . . . . 2
3. INSTALLING COMX . . . . . . . . . . . . . . . . . . . . . 4
3.1 COMX Files on The Installation Disk . . . . . . . . 4
3.2 Hardware and MSDOS Requirements . . . . . . . . . . 4
3.3 Copying Files to Your Computer . . . . . . . . . . . 5
3.4 Starting COMX and Finishing The Installation . . . . 5
4. EXITING COMX ([M:Alt-X]) . . . . . . . . . . . . . . . . . 7
5. HELP ([M:F10]) . . . . . . . . . . . . . . . . . . . . . . 7
6. STARTUP OPTIONS . . . . . . . . . . . . . . . . . . . . . 7
7. TERMINAL EMULATION ([M:Alt-T]) . . . . . . . . . . . . . 10
7.1 General Information . . . . . . . . . . . . . . . 10
7.2 Function Keys . . . . . . . . . . . . . . . . . . 11
7.3 Specific Information on Options in [M:Alt-T] . . . 11
8. DIALING INTO ANOTHER COMPUTER . . . . . . . . . . . . . 13
8.1 Dialing From Terminal-Mode . . . . . . . . . . . . 13
8.2 Dialing From the Autodial Directory ([M:Alt-D]) . 14
8.2.1 Adding an Entry ([M:Alt-D,A]) . . . . . . . 14
8.2.2 Changing/Modifying an Entry ([M:Alt-D,C]) . 14
8.2.3 Dialing an Entry ([M:Alt-D,D] or Entry#) . 15
8.2.4 Sorting Entries ([M:Alt-D,S]) . . . . . . . 15
8.2.5 Technical Notes . . . . . . . . . . . . . . 15
9. SENDING AND RECEIVING FILES ([M:PgUp] and [M:PgDn]) . . 15
9.1 General Information . . . . . . . . . . . . . . . 15
9.2 Sending a File to Another Computer ([M:PgUp],
`Uploading') . . . . . . . . . . . . . . . . . . 16
9.2.1 Basics . . . . . . . . . . . . . . . . . . 16
9.2.2 Aborting the Transfer . . . . . . . . . . . 16
9.2.3 Technical Notes . . . . . . . . . . . . . . 17
9.3 Receiving a File from Another Computer ([M:PgDn],
`Downloading') . . . . . . . . . . . . . . . . . 18
9.3.1 Basics . . . . . . . . . . . . . . . . . . 18
9.3.2 Technical Notes . . . . . . . . . . . . . . 18
10. KEY-MACROS ([M:F1]) . . . . . . . . . . . . . . . . . . 18
10.1 General Information . . . . . . . . . . . . . . . 18
10.2 Invoking a Key-Macro . . . . . . . . . . . . . . 19
10.3 Special Key-Macro Characters . . . . . . . . . . 19
11. SAVING OPTION CHANGES TO COMX ([M:F3]) . . . . . . . . 20
12. RUNNING A SCRIPT FROM WITHIN COMX ([M:F4]) . . . . . . 20
13. SENDING TERMINAL-MODE CHARACTERS TO THE PRINTER
i ([M:F5]) . . . . . . . . . . . . . . . . . . . . . . . 20
14. SAVING TERMINAL-MODE CHARACTERS IN A FILE ([M:F6]) . . 20
15. DOS ACCESS ([M:F7]) . . . . . . . . . . . . . . . . . . 21
16. ABORTING A FILE TRANSFER PROGRAM ON ANOTHER COMPUTER
([M:Alt-A]) . . . . . . . . . . . . . . . . . . . . . 21
17. CHANGING SERIAL (COM) PORTS ([M:Alt-C] or [M:F2,A]) . . 21
18. CHANGING PRINTER (LPT) PORTS ([M:F2,B]) . . . . . . . . 21
19. INVOKING A WORD PROCESSOR OR EDITOR FROM WITHIN COMX
([M:Alt-E]) . . . . . . . . . . . . . . . . . . . . . 21
20. HANGING UP THE PHONE ([M:Alt-H]) . . . . . . . . . . . 21
21. LOGGING FILE TRANSFERS ([M:Alt-L]) . . . . . . . . . . 22
22. TURNING THE MAIN MENU OFF AND ON ([M:Alt-M]) . . . . . 22
23. PRINTING A FILE DURING ITS DOWNLOAD ([M:Alt-P]) . . . . 22
24. DISPLAYING A FILE DURING ITS DOWNLOAD ([M:Alt-S]) . . . 22
25. REDIALING A PHONE NUMBER ([M:Alt-R]) . . . . . . . . . 22
26. LISTING THE FILES IN A DIRECTORY ([M:F2,M]) . . . . . . 22
27. VIEWING A TEXT FILE ([M:F2,N]) . . . . . . . . . . . . 23
28. HOST-MODE ([M:F2,L]) . . . . . . . . . . . . . . . . . 23
29. USING COMX UNDER DESQview (V. 2.2/2.3) AND WINDOWS 3.0 24
30. CREATING A 132 COLUMN DISPLAY / MULTI-COM PORT DRIVER . 25
31. SCRIPT FILES . . . . . . . . . . . . . . . . . . . . . 27
31.1 General Information . . . . . . . . . . . . . . . 27
31.2 $Variables . . . . . . . . . . . . . . . . . . . 28
31.3 Jump Labels . . . . . . . . . . . . . . . . . . . 29
31.4 Toggling Activity . . . . . . . . . . . . . . . . 29
31.5 Error Return Values from Commands (ERRVAL) . . . 29
31.6 Basic Commands . . . . . . . . . . . . . . . . . 30
31.7 Stack Commands (.op __) . . . . . . . . . . . . . 35
31.7.1 General Information . . . . . . . . . . . 35
31.7.2 Math Operations on Stack Values . . . . . 36
31.7.3 Moving Values To, From and On Stack . . . 37
31.7.4 Comparison of Stack Values . . . . . . . . 37
31.8 Jump Commands (.op j_) . . . . . . . . . . . . . 37
32. TIPS AND TRICKS . . . . . . . . . . . . . . . . . . . . 38
33. ASCII CHARACTER SET AND ANSI.SYS ATTRIBUTE
ii ESC SEQUENCES . . . . . . . . . . . . . . . . . . . . 40
34. COMX SCRIPT FILE TRACER AND DEBUGGER (CXTRACE.EXE) . . 41
35. FILE COMPRESSION AND DECOMPRESSION (CXCOMP.EXE) . . . . 42
36. ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . 43
37. LIABILITY . . . . . . . . . . . . . . . . . . . . . . . 43
38. TECHNICAL SUPPORT . . . . . . . . . . . . . . . . . . . 43
39. INDEX . . . . . . . . . . . . . . . . . . . . . . . . . 44
iii
1. OVERVIEW AND HISTORY OF DEVELOPMENT
COMX was originally developed to provide users of PC's easy
access to UNIX mainframes. From the start, I also wanted to
design a program that could be ported easily to different
hardware configurations. With this in mind, COMX was written in
`C', `lex' and assembly. Direct video access was kept to a
minimum. COMX has undergone extensive testing and the resulting
program is before you now. COMX offers terminal emulation, file
transfer capabilities, a `host-mode' and an extensive script
language. COMX can run under a windowing environment such as
DESQview and Windows 3.0. The script language which is provided
is a low level, prefix notation language. A compiler is presently
being developed to support higher level commands.
Benefits to using COMX:
Requires Only 130K of Memory
Terminal Emulation - Ten types are supported including
printer control
File Transfers - Nine transfer protocols are supported
132 Column Display
Extensive Script File Language - Supports merged scripts
and flow control
Command Line Script File Execution, Including Arguments
Key-Macros
Host-Mode
Access Up To 15 COM Ports - At once or individually
Operates Under DESQview and Windows 3.0
Operates with CGA/EGA/VGA/Hercules Video Boards
Operates on Generic MSDOS Computers
Operates on 8086-80486 Computers
Network Compatible
Utility Programs: Script Tracer, File Compressor, Etc.
SPEED
1
2. INFORMATION ON THE NOTATION IN THIS DOCUMENT AND ON COMX
MENU AND KEYBOARD USAGE
My comments are enclosed in `{}'.
<Esc> Means: Press the Escape key. This will get you out of
most predicaments.
<Enter> Means: Press the Enter/Return key.
<Cntrl-U> e.g., Means: Press the Cntrl-key & `U'-key
together.
[Alt-A] e.g., Means: Press the Alt-key and `A'-key
simultaneously.
[F2] e.g., Means: Press the F2-function key.
Menu options are frequently designated by the key strokes
needed to execute them. For example, [F2,A] means: Press the
F2-function key followed by the `A'-key. The following type
of notation is also used: [M:F2,O,B]. In this case, the
preceding `M:' means that the following key strokes can be
executed from the main startup menu or terminal-mode.
[...] Means: Optional argument in [].
<...> Means: Required argument in <>.
LF Means: linefeed (ascii 10); CR Means: carriage return
(ascii 13).
EOL Means: Text file end-of-line designation (normally
CR/LF).
Editing Input:
When you are asked for more than one character of input
information, the following keys may be used to edit your
input as it is entered:
<Cntrl-U> Erase the entire line.
<Cntrl-End> Erase from the cursor to the end of the
line.
<Home> Move cursor to the start of the line.
<End> Move cursor to the end of the line.
<Right> Move cursor to the next character.
<Left> Move cursor to the previous character.
<Cntrl-Right> Move cursor to the next word.
<Cntrl-Left> Move cursor to the previous word.
<Backspace> Delete character before the cursor.
<Delete> Delete character under the cursor.
You can enter only one line of information.
2 A final note: If you use a word processor to prepare a COMX
script or key-macro file, make sure that you save the file
as a DOS text file. COMX does not understand the control
characters that are frequently found in word processor
files.
3
3. INSTALLING COMX
3.1 COMX Files on The Installation Disk
Main Program (Only One Required)
COMX.EXE For 8086-80486 computers.
COMXG.EXE For computers with IBM INcompatible serial
port hardware.
Utility Programs
CXTRACE.EXE Script file tracer and debugger.
CXCOMP.EXE File compression and decompression program.
CXDRIVER.EXE Video and COM port driver creation program.
Miscellaneous Files
COMXKEY.TXT An example key-macro file.
COMXHELP.TXT Text file containing the help information that
is sent to a remote computer when COMX is in
host-mode and an .he command is received.
CXDRIVER.TXT A demo file which can be run through CXDRIVER.
COMXPWD0.TXT An example password file for host-mode.
Script Files
HOSTON.CEX Host-mode activation - Required.
HOSTOFF.CEX Host-mode deactivation - Required.
INSTALL0.CEX An example of installation-script settings.
NETBRK.CEX Broadband network hangup.
VT220KEY.CEX VT220 function key mappings.
TELEKEY.CEX Televideo 950 function key mappings.
SERVER.CEX Example of server commands for a UNIX system.
STACK.CEX Demonstration of COMX stack operations.
LINK.CEX Set system parameters so that two computers
linked by a null modem, and both running COMX,
can communicate with one another.
LOGIN.CEX A simple automatic login script.
MODEM.CEX Sends Hayes commands to a modem to properly
initialize it for COMX.
UNXHELP.CEX A very simple help-menu script.
HANGUP.CEX Sends commands to a modem to hangup the phone.
TOOLS.CEX Some useful utilities from a menu.
3.2 Hardware and MSDOS Requirements
An MSDOS computer (MSDOS 2.11 or higher) and a Hayes-compatible
modem unless attached to a network. If your computer is IBM
compatible, use COMX.EXE. If your computer has nonstandard serial
port hardware, use COMXG.EXE. (Uses Bios interrupts for serial
I/O.) COMX.EXE requires 130K of memory.
The MSDOS extended screen driver, `ANSI.SYS', should be
installed. Normally, you would do this by including in your
4 `CONFIG.SYS' file the line, "DEVICE=ANSI.SYS". The latter assumes
that `ANSI.SYS' is in the root directory of your bootup drive.
COMX can sense the kind of video hardware which you are
using and configure itself appropriately. The disk from which you
are running COMX.EXE should be writable.
3.3 Copying Files to Your Computer
Only those files which are marked `Required' above are necessary
for the minimal operation of COMX. You should decide on a
directory for COMX.EXE. (This should be in your DOS Search PATH.)
You should also decide on a directory for your COMX script files.
(This need not be in your DOS Search PATH. If you are using
`COMX.EXE', you will be asked for the name of this directory the
first time you start COMX.) Files labeled `Miscellaneous' above,
should reside in the root directory of your bootup drive. Let's
assume that the COMX distribution files are located on a floppy
disk in Drive A:, and that you wish to locate COMX.EXE (and
utility programs) in the root directory of Drive C: and script
files in the directory, C:\COMX. From Drive C: you would type the
following commands:
CD C:\
MKDIR COMX {If the directory doesn't already
exist.}
COPY A:*.EXE
COPY A:*.TXT \ {These files must be in the root
directory of your bootup drive.}
COPY A:*.CEX COMX
3.4 Starting COMX and Finishing The Installation
If your computer is attached to a modem, turn on the modem at
this time. For modems with dip switches which control DTR and CD
lines, both switches should be set so that the lines are NOT
FORCED HIGH at all times. COMX will not work properly unless
these dip switches are set correctly.
At the DOS prompt type: COMX <Enter>
If your computer has an active modem a series of Hayes commands
will be sent to it. These will configure it optimally for COMX.
The commands are:
AT&D2&C1L1TX1&W
These commands will only be sent if a CTS (clear-to-send) signal
is detected. The last command, `&W', writes the parameters to the
modem's nonvolatile memory. If your modem does not support this
command, you may wish to include the following line in the file,
`COMXAUTO.CEX':
5 .tr AT&D2&C1L1TX1^M
`COMXAUTO.CEX' is a script file which is automatically executed
each time you start COMX. It should be located in your COMX
script directory.
During the installation period, COMX will save information
about your system in the files, `COMXN.SET'and `COMXMM.SET', in
your root directory. The next time you start COMX this
information will be recalled. After the installation period, you
will see the main COMX menu. If you press any key, other than one
of the function keys listed on the menu, the screen should clear.
You are now in the `terminal-mode'. In this mode, any key that
you type will be passed on to your modem via the serial port.
Let's see if your modem is working properly.
Type: AT <Enter>
You should see `OK' displayed on the screen. If you do, all's
well and you could play around a little or simply exit COMX
([Alt-X]). If not, something may have confused COMX during the
installation, or your modem may not have been turned on. If the
latter was the case, exit COMX ([Alt-X]), turn on your modem and
start COMX again. However, this time you will have to
specifically tell COMX to initialize itself:
Type: COMX /I <Enter>
If your modem is on, check to see if the serial port settings are
correct. To do so, bring up the main menu ([F10]) and on the
status line, you'll see the serial port settings for the current
serial (COM) port. You may see something like, `1200E17', which
stands for:
1200 - Baud rate.
E - Even parity.
1 - 1 Stop bit.
7 - 7 Bit word length.
{These are the general default settings for a modem.}
Is the baud rate correct for your modem? If not, hit [Alt-U]. The
cursor will be on the baud rate value. Use any normal key to
bring up successive rate values until the correct one is in the
field. At this point you could change the other parameters by
using the left or right arrow key to move to the appropriate
field and any other key to change the value in that field. To
save your new settings, just press <Enter>. Your new values will
appear on the status line. Press [F3] to save this change for the
next time you invoke COMX. Now let's try your modem again. Press
any non-function key to return to the terminal-mode. Repeat the
`AT' - test. Still no response? Do you have more than one serial
port? If so, COMX may have gotten confused during the
installation. Press [Alt-C]. This will move you to the next
higher serial port. Make sure that your serial port settings are
correct as described above. (Different settings can be associated
6 with different serial ports.) Make sure you press [F3] to save
any changes to these settings. Keep trying to invoke an `AT'
response until you've exhausted all of your serial ports. Still
no response? Did you remember to set those modem dip switches
correctly as I told you above? If not, exit COMX now ([Alt-X])
and set them. Reinitialize COMX as I described earlier. If all
else fails, try some of the startup options described below.
You can specify your default installation settings in a
special script file, `INSTALL.CEX', which should be located in
the root directory of your bootup drive or in your script
directory if it happens to be: C:\COMX. During the installation
of COMX, settings will be taken from this script file. See the
sections on script files for more information.
At some point you should verify that the information
generated during COMX's initialization is correct. Specifically,
there are two pieces of information which are critical for the
normal operation of COMX. Both are located in the F2-Menu. Press
[F2] to get to this menu. If your computer is attached to a
modem, the entry under item [H] should be CONNECT. Also, the
script file directory indicated under option [C] should coincide
with where you copied the COMX script files. Change these two
entries if necessary, exit the F2-Menu and save your changes by
pressing [F3].
4. EXITING COMX ([M:Alt-X])
Hit [Alt-X] from the main menu or the terminal-mode screen. This
is the only way to do it.
5. HELP ([M:F10])
Hit [F10] from the main menu or the terminal-mode screen. The
main menu will be displayed.
6. STARTUP OPTIONS
In the following, `-' may be substituted for `/'. Option letters
may be in lower case.
Summary of Option Usage
COMX /Port# /OPort# /VVaddr# /CCOLORS /D /E /H /I /M /P /S
[Script File List] [-- $Argument List]
/Port# Where Port# = 1 -> maximum number of serial
ports. Normally, COMX initializes itself to
the COM Port to which an active modem is
attached. This option will override that
feature, so that on entry, the current port
will be the COM Port#. Other ports will still
be active.
For example: COMX /2 {Enter on COM2}
/CCOLORS Set colors for bold, reverse video and
7 underline where:
COLORS = A three character string (e.g.
/CYWR). The first character of the string is
the code for bold; the second character of
the string is the code for reverse video; the
third character is the code for underline.
These codes only apply if you are using a
color monitor. On monochrome displays,
underlined characters will actually be
underlined.
Bold Code
Y: Yellow characters on a blue background.
W: White on blue.
R: Red on blue.
G: Green on blue (default).
Reverse Video Code
Y: Yellow on red.
B: Black on green.
G: Green on black.
C: Cyan on black (default).
Underline Code
Y: Yellow on blue (default).
W: White on blue.
R: Red on blue.
G: Green on blue.
/D Set DTR signal OFF (Low) at all times. {RTS
is always ON (High)}
/E Computer equipment report only.
/I Force the initialization of COMX. Appropriate
scripts may be run with this to specifically
customize various COMX parameter options.
/H If your VGA board is emulating a Hercules
board and you are not seeing bold characters
in the menus, use this option.
/M Monochrome display. {Use only if problems are
experienced.}
/OPort# Open a specific COM Port# and no others.
Port# = 1 -> maximum number of serial ports.
Normally, all ports are opened and
initialized.
/P A specific video hardware address is not used
for display paging. {Use only if problems are
8 experienced.}
/S Turn off the terminal-mode status line.
/VVaddr# Use a specific video segment address (Vaddr#,
hexidecimal) for display output. For example,
VB800 - Default for color card.
VB000 - Default for monochrome card.
Be very careful of this option; make sure
that the address is correct.
[Script File List]
One can have COMX run one or more script
files automatically on startup by including
the names of these script files on the
command line. For example,
COMX modem login
A .CEX extension is assumed.
[-- $Argument List]
$Arguments will replace $Variables in the
FIRST script that is also given on the
command line. (See script file sections
below.)
For example,
COMX sendfile -- file1 file2
In the above example, assume that there is a
script file, `sendfile.cex', which
automatically connects you to another
computer and executes a command on that
computer to start a file upload. In
`sendfile.cex' the script file command to
begin the upload might be something like:
.ru 0 kermit s $1 $2
In this example, `file1' would be substituted
for $1, and `file2' would be substituted for
$2 in the script command. There is also a
special $Argument,
-?[prompt]
which will result in a prompt for that
argument; your input will then replace a
$Variable. Spaces can be represented by `^S'
in the $Argument and [prompt]. Control
characters can be represented as described in
Section 10.3, "Control Character
Representation". For example,
-?File^SName?^S^G
There can be multiple -?s. Successive
$Variables will be replaced beginning with
9 $1.
7. TERMINAL EMULATION ([M:Alt-T])
7.1 General Information
Most mainframes support some kind of terminal emulation, and COMX
provides extensive support for various emulation types.
Basically, terminal emulation allows the other computer to
recognize what you mean when, for example, you hit the up arrow
key. It's really quite a bit more complicated than this, but this
brief explanation should suffice for now. After COMX is
initialized, the default emulation type is DEC VT100. (This also
supports VT102 & VT220 emulations.) If you need to change the
type of terminal emulation, you would do so by hitting [M:Alt-
T,A]. A great deal of trouble was taken to ensure that the
default option settings in the [Alt-T] menu produce the smoothest
emulation; however, there may be times when it's necessary to
change these settings. (Be forewarned, that some mainframe
programs will change some of these settings for you. So, if you
are experiencing difficulties after running a program, check the
settings.)
To change the terminal emulation type hit: [M:Alt-T,A]
Just press the letter next to the emulation type desired. You
will be returned to the previous menu. Note that the current
emulation type under [A] has been updated.
Each emulation has a unique abbreviation. This abbreviation
is important, since you need to use it in setting a specific
terminal emulation type from script files, e.g.,
`.terminal vt100' {See script file sections below.}
As a reference, abbreviations for the various terminal emulation
types are as follows:
Terminal Abbreviation
VT220/VT10x[1] vt100
VT52 vt52
VI300 vi300
ANSI ansi
IBM 3101 ibm3101
Televideo 950[1] tele950
Lear ADM 3/5 adm5
ADDS Viewpoint adds
Frequently, the other computer needs to be informed of the
type of terminal emulation you are using. On a UNIX computer you
might issue the command: setenv TERM vt100
[1]Printer control commands are supported. If your printer
is not ready to print, COMX will abort the command after beeping
several times.
10 7.2 Function Keys
The arrow keys produce the correct responses under the different
emulations. In addition <Home> moves the cursor to the `home'
position on the screen and <End> will erase the characters from
the current cursor position to the end of the line. The following
keys are specifically mapped for VT220/VT102/VT100/VT52
emulations:
VT100-220 COMX Key Board
Key
PF1 Shift-F1
PF2 Shift-F2
PF3 Shift-F3
PF4 Shift-F4
Keypad:
1 Alt-1
2 Alt-2
3 Alt-3
4 Alt-4
5 Alt-5
6 Alt-6
7 Alt-7
8 Alt-8
9 Alt-9
0 Alt-0
- Alt-F1
, Alt-F2
. Alt-F3
<Enter> Alt-F4
<Break> Alt-B
Except for <Break>, these keys have no meaning to the other
terminal emulation types. Two script files are provided to enable
mapping of the extended function keys of VT220 and Televideo 950
emulations. These files are `VT220KEY.CEX' and `TELEKEY.CEX',
respectively. You will need to load these mappings into your key-
macro buffer, so that they can be used. To do this for, e.g.,
VT220 emulation:
1) From the terminal-mode or main menu, hit [F4] {Respond
with: vt220key.}
2) To use a key in terminal-mode, e.g. [F5]: [F1,F5] or e.g.
[F20]: [F1,1,F10]
{See section on key-macros.}
7.3 Specific Information on Options in [M:Alt-T]
[M:Alt-T,A]
Terminal Emulation Type: Covered above. (Default =
vt100)
11 [M:Alt-T,B]
Tab Size: The width of tab-stops can be set to 2-20
columns. (Default = 8)
[M:Alt-T,C]
Wrap Line: Incoming characters which go beyond 80
columns are `wrapped' to the next line. (Some mainframe
programs will turn this off for you.) (Default = YES)
[M:Alt-T,D]
Translate Incoming LF .... Normally an incoming line of
text ends with a CR/LF. However, under certain
situations this may not be the case, and you may need
to use this option. One case in which this needs to be
used is when you have two computers connected with a
null modem and both are running COMX. (Default = NO)
[M:Alt-T,E]
Graphics Character Display: Normally, the 8th-bit
(graphics bit) of an incoming character is stripped off
before the character is displayed. If you are connected
to a computer which is capable of sending graphics
characters, you should turn on this option. (Default =
NO)
[M:Alt-T,F]
Destructive Backspace: Normally, an incoming backspace
character (ascii 8) simply moves the cursor to the
left. This option will also blank out the character
onto which the cursor has moved. (Default = NO)
[M:Alt-T,G]
Xon/Xoff Flow Control: COMX will provide Ctrl-S/Q flow
control with its terminal emulation. Using this may
cause problems if you are also using a modem; garbage
characters which are received by COMX after you
disconnect from another computer may inactivate serial
I/O. I would recommend that you use this option only if
you appear to be losing characters from the other
computer. This may occur if you are communicating at
baud rates greater than 4800. (Default = NO)
[M:Alt-T,H]
Enable 132 Column Display: COMX is capable of
displaying 132 columns (x 25 rows), but only if you are
using a VGA card which can provide 132 column display.
If you choose to enable this option, you will be asked
for a string consisting of two values separated by a
space (e.g., 55 1). The first value corresponds to the
INT 10H extended video mode value (hexidecimal) which
your VGA card uses for 132 columns. The second value
(1=Yes,0=No) indicates that COMX should either use (1)
or not use (0) its own 8x16 character font for 132
columns. For a Paradise VGA Plus 16 card, the correct
string is: 55 1
12 To determine the video mode value to use with your
particular card, do the following:
1) From DOS, execute the program or command which
causes your monitor to go into 132x25 display mode.
(See the instruction manual which came with your VGA
card.)
2) Type: COMX /E <Enter> The video mode value which you
should use is indicated on the second line (`Video Mode
...'). The value (first of two) should be greater than
7.
If you enable 132 column display, then you can either
invoke COMX in this mode (as long as your monitor is
already in this mode as described in 1) above), or COMX
will be capable of switching to this mode if the
appropriate terminal emulation-reset command is
received from another computer. (Default = NO)
Note: Your VGA card may require the use of an extended
DOS INT 10H function to switch to 132x25 display mode.
Since switching is normally done through function,
0x0fH, you may have to use the program, CXDRIVER, to
create a video driver which would enable you to use
this option. Please refer to the documentation below on
how to create such a driver.
[M:Alt-T,I]
Duplex: In full duplex mode, COMX assumes that the
characters which you type in terminal-mode will be
echoed back to your computer by the other machine. In
half duplex mode, COMX itself will echo these
characters. (Default = FULL)
[M:Alt-T,J]
Break Signal Duration: This is the length of time
(multiple of 55 ms) in which a break signal is sent
when [Alt-B] is hit. The default is 5 for VT100
emulation.
8. DIALING INTO ANOTHER COMPUTER
8.1 Dialing From Terminal-Mode
Before you begin, you should know what serial port settings are
used by the other computer and make the necessary changes in COMX
using [M:Alt-U], so that the settings at both ends are
comparable. Now, from the terminal-mode you can send a command to
the modem to have it dial the other computer's phone number. This
may be a command like:
ATD2334188 <Enter>
{See your modem manual if this doesn't work.}
13 If this is the correct phone number, and your serial port
settings agree, you're in luck.
8.2 Dialing From the Autodial Directory ([M:Alt-D])
8.2.1 Adding an Entry ([M:Alt-D,A])
You can store phone numbers and other information in a directory
so that you can quickly connect to another computer at the press
of a key. This information is saved in the file, `comx.adr', in
your root directory. The first time you enter this directory,
there will be no information in it. You must first add an entry
to use it. To do so, hit [A]. You will be asked a series of
questions:
1) Script?
If you wish COMX to automatically invoke a script for
that particular entry (e.g., to log you in), you should
enter the script name here. Do not include the .CEX
extension. All punctuation characters (*,;.?) and
blanks will be stripped from the script name. If your
script has a `.di' or `.gb' command in it, the command
will be ignored. (See script sections below.) You can
use a dummy script name if you like or have no script
name.
2) Description?
This is a brief description of your entry. Punctuation
is allowed. You can leave it blank if you wish.
3) Phone Number?
There has to be something in this field. It can be an
actual phone number (e.g., 0001111). You can prefix
this number with a Hayes command (e.g., ATP 000 1111)
(`ATD' is the default), and you can imbed modem control
characters in it (e.g. 1,,800 0001111). The entry does
not have to be a phone number (e.g. ~call 8200). For
the latter case, a `~' was placed before the command
to circumvent a dialup attempt. The `~' is ignored.
4) Serial Port Settings?
Your entry can have a unique serial port setting
associated with it. The current settings are the
defaults. Changes to these settings are made by using
the left or right arrow key to move to a specific field
and any other key to move through successive values in
each field. Hit <Enter> to finalize your settings.
5) Save?
`y' or `n'
If you add more than 10 entries, the additional entries can be
viewed using [+] or [-] to page you forward or backward through
them.
8.2.2 Changing/Modifying an Entry ([M:Alt-D,C])
Now that you have entered something, you should see it in the
directory listing. Let's suppose you want to change the values
14 associated with a particular entry. Press [C,m] -> Entry Number?
Give the Entry Number you wish to modify. The subsequent
questions are similar to those asked when adding an entry, except
that this time, if you do not wish to change a value, just hit
<Enter>. Otherwise, enter something to replace existing
information, or a `*' to blank the value.
You can delete or undelete an entry under option [C]. If you
delete an entry ([C,d]), you will see a `*' next to the entry.
This only marks an entry for deletion. The deletion doesn't
become effective until you exit the directory ([X]). Escaping
(<Esc>) from the directory will abort any changes that you have
made to it.
8.2.3 Dialing an Entry ([M:Alt-D,D] or Entry#)
This can be done in either of two ways:
1) Press [D] and give the entry number.
2) Just hit the entry number (e.g. 5).
If you are on another directory page (e.g., one which
contains entries: 11-20), you need only hit, e.g., [0] to
dial Entry# 20. Once you dial the number, COMX will wait up
to 30 seconds for a carrier signal from the other computer.
If you want to abort the operation, press <Esc>.
8.2.4 Sorting Entries ([M:Alt-D,S])
Directory entries can be sorted in ascending or decending order
for easier reference.
8.2.5 Technical Notes
After dialing a number COMX can adjust to a lower baud rate which
the other computer might be using. (This is done in an identical
fashion to that described below for the .gb script command.) COMX
makes this adjustment by looking for an extended modem command,
typically "CONNECT" (e.g., CONNECT 1200), which is issued by the
modem following the connection. On COMX installation, the modem
(if one is active) is told to use the extended modem command set.
In addition, the entry in [M:F2,H] is set to "CONNECT". If, for
some reason, the command is different, change the entry in
[M:F2,H], or if your modem cannot use these extended commands,
delete this entry. (This is Important.)
9. SENDING AND RECEIVING FILES ([M:PgUp] and [M:PgDn])
9.1 General Information
To send or receive a file(s) to or from another computer, you
must first connect to that computer. I've described above how
this can be accomplished. Next, from the terminal-mode you will
have to issue a command on the remote computer to start the
transfer at that end. COMX supports several file transfer
protocols including:
15 Protocol Description
Kermit Batch, with 8-bit and repeat-character
prefixing, 1-3 byte error detection,
`k'[2].
Xmodem 128 Byte blocks, checksum error detection,
`x'.
Xmodem [CRC] 128 Byte blocks, CRC error detection, `xc'.
Ymodem 1K Byte blocks, checksum, `y'.
Ymodem [CRC] 1K Byte blocks, CRC, `yc'.
Ymodem [BATCH] Batch, 1K byte blocks, CRC, `ya'.
Ymodem-G Batch, 1K byte blocks, CRC, `yg'.
Modem7 Batch, 128 byte blocks, checksum, `m7'.
Ascii No error detection, `a'.
`Batch' means that multiple files may be sent or received in one
session. The X/Ymodem protocols conform to the details published
in, "Xmodem/Ymodem Protocol Reference. A Compendium of Documents
Describing the Xmodem and Ymodem File Transfer Protocols" (Chuck
Forsberg, ed., 1987).
Now that you know what's available, you can issue a command
on the other computer to start a program compatible with one of
the above protocols. Read on first, though.
9.2 Sending a File to Another Computer ([M:PgUp], `Uploading')
9.2.1 Basics
After you have started a file transfer program on the other
computer, specifically to DOWNLOAD a file, press [PgUp]. You will
be presented with a number of protocol choices as described
above. Select the desired protocol. You will next be asked for
the name of the file (`file(S)' for batch protocols) which you
wish to send. If you are sending more than one file, you can
enter file names separated by spaces, commas or semicolons, and
you can use DOS metacharacters (e.g. filex,d:\tmp\filey.* ). If
you have forgotten the file name(s), just enter a directory name
and the files in that directory will be listed. If the directory
name is capitalized, you will get a long listing of entries;
otherwise, a short listing will be displayed. After the directory
listing is displayed, you will again be asked for the file
name(s).
If all goes well, the file(s) will begin transferring and
you should see the progress of this transfer displayed on your
screen.
9.2.2 Aborting the Transfer
If you press <Esc> at some point, the COMX end of the transfer
will be aborted (after some delay), and you MAY see a message
like:
[2]This is the abbreviation you will use to designate the
protocol in a script file. (See script file sections.)
16 `Remote Transfer Abort: ....'
Don't panic. This simply means that you have the option of
aborting the transfer program which is running on the other
computer. Respond according to the protocol you are using.
Incidentally, this request is also available from terminal-mode
([M:Alt-A]).
9.2.3 Technical Notes
COMX analyzes a file before it is sent to determine whether it is
a text or binary file. (Certain protocols require this
distinction.) The algorithm which COMX uses, looks at the first
1000 characters for ascii values greater than 127 or 0 (null). If
such characters are present or if it finds LF's which are not
preceded by CR's, then it assumes that the file is binary (image,
graphics). If you are experiencing problems related to the file
type, you can force COMX to ask you for the type, and use this
type, each time you send a file. You would do so by pressing
[M:F2,O,H]. Don't forget to save this option change ([M:F3]).
Binary files are typically *.exe, *.com and *.arc files and those
produced by various graphics packages. They also may be produced
by word processors. For text files, COMX interprets Ctrl-Z as the
end of file (EOF) mark. If, for some reason, your text file
contains additional Ctrl-Z's (i.e. ones which occur before the
end of the file), then you can force COMX to not interpret them
as EOF's by using the [M:F2,O,H] option. (When sending the file,
specify that the file is a text file.) Graphics characters in
text files can be handled in the same way, if you want the file
sent as a text file.
X/Ymodem protocols may not work properly over 7-bit
networks. However, one of the options ([M:F2,O,J]) may allow this
operation provided that the other program also recognizes the
change in protocol.
You can specify an underlying Xon/Xoff (Ctrl-Q/S) protocol
with your transfer ([M:F2,O,I]). This works on uploads only. To
be effective, the other side must also recognize this option.
This helps when a mainframe is busy and you are experiencing
buffer overruns.
You can specify the default directory from which files will
be sent ([M:F2,E]). This can be overridden by including the
directory with the file name.
For text files, COMX can specify the end-of-line (EOL)
designation in a variety of formats to ensure compatibility with
a format on another computer ([M:F2,O,B-D]). The default settings
should be acceptable to most mainframe computers.
For X/Ymodem protocols, a Ctrl-Z is appended to the end of a
text file, and the remainder of the block is padded with nulls
(ascii 0).
There is a nonstandard Kermit option provided with COMX
([M:F2,O,P]) which will allow the transmission of 512 byte
packets (uploads or downloads). Contact the author of COMX for
further details.
Occasionally, you may see a period (`.') displayed on the
screen instead of a byte number. This means that a timeout has
17 occurred during the transmission.
The length of timeouts and the maximum number of packet
retries can be changed:
[M:F2,O,E-G]. Default values should be optimal however.
Various parameter values for Kermit can be changed in
[M:F2,O], however, I would not advise doing so.
The way ascii uploads are handled can be specified using the
.as script file command. (See script file sections below.) You
can also change this specification using `TOOLS.CEX'.
9.3 Receiving a File from Another Computer ([M:PgDn],
`Downloading')
9.3.1 Basics
Now that you've gotten all of that under your belt, let's try
receiving a file. The process is the same, although this time you
will first start a file UPLOAD on the other computer, followed by
pressing [PgDn]. Select the protocol and answer the questions as
described above. If you are using a batch protocol, you will not
be asked for a file name; this(ese) is sent along with the file.
In the latter case, if the file name is unacceptable to DOS, you
will be prompted for a new file name. If the file already exists,
a new name will be created with a `$' replacing the last
character in the name. In contrast to uploads, you will be asked
whether the file is text or binary. All files for a given session
should be of the same type; in a batch transfer, you will not be
asked this question for each file.
Normally, if the download is aborted, the received file to
that point is saved. However, you also have the option of having
it deleted automatically ([M:F2,O,A]). You can also specify the
directory in which a received file will be placed ([M:F2,D]). The
latter can be overridden by giving the full path file name
(nonbatch protocol).
9.3.2 Technical Notes
For received text files, COMX will correctly handle, and if
necessary translate, several end-of-line formats (CR, CR/LF or
LF).
For ascii DOWNLOADS, you can start the UPLOAD from the OTHER
computer AFTER pressing [PgDn] and selecting `a'. You will be
prompted for the command which will start sending the file from
the other machine.
10. KEY-MACROS ([M:F1])
10.1 General Information
A key-macro is a line of text sent to the modem and/or other
computer after a specific key is pressed in the terminal-mode.
Optionally, the text can also be sent to the printer or screen.
The text can be a command recognized by the other computer (e.g.,
`dir wp^m') or anything else. Normally, you would use a word
processor to enter these macros into a special COMX file,
18 `COMXKEY.TXT', which should be located in the root directory of
your bootup drive. On starting COMX, these macros are
automatically loaded into a key-macro buffer. In `comxkey.txt'
there should only be one macro per line; blank lines are ignored.
There can be up to 30 macros in the file. You can also place
specific macros in the buffer by using the script command:
.km <n> <text> {See script sections below.}
10.2 Invoking a Key-Macro
Once you have created the file, `COMXKEY.TXT', macros can be
invoked from the terminal-mode. (An example file is provided with
this package.) First, however, let's see what you have in the
buffer. Press [M:F1,h]. You will see a listing of key-macros
along with their function key assignments. Let's suppose that
`ls^M' is assigned to [F1]. To invoke this macro from the
listings menu, just press [F1]. If you wanted to invoke this
macro from the terminal-mode, you would press [F1] followed by
[F1]. The listing menu is divided into 3 pages. (Page: 0 is the
first page -see the menu header.) If you have, let's say, 18
macros and macro #16 is `mail^M', you could invoke this macro
directly from the terminal-mode by pressing:
[M:F1,1,F6]
In this case, the second argument, 1, is the page number. Page
numbers can also be used with the `h' option, e.g.,
[M:F1,1,h]
or from within the listings menu, e.g.,
[1,h]
You may also move to a different page from within the listings
menu and activate the macro, e.g.,
[M:F1,h,1,F6] {For macro #16}
10.3 Special Key-Macro Characters
Special character sequences can be used to control the execution
of a macro:
Control Character Representation
{The case of the following letters is not important. Also,
`^J', e.g., means: `^' followed by `J'.}
^J - Linefeed. {A ^J is NOT automatically added.}
^M - Carriage Return. {A ^M is NOT automatically added.}
^[ - Escape.
^I - Tab.
^G - Beep.
^L - Formfeed.
^S - A Space Can be Represented by ^S.
^^ - Control-^
\^ - ^ Itself.
{Other representations are also possible, e.g., ^A,^B ....}
19 If you need leading spaces before a command precede them
with a `"', e.g., " mail^M
Normally, all leading spaces are ignored. (The first `"' on
the line is ignored.)
Output Control Sequences
^C - A starting ^C means: send the text which follows
^C to the COM port. (This is optional, since this
is the default.)
^P - A starting ^P means: send the text which follows
^P to the printer.
^R - A starting ^R means: run the script which follows
^R. $Arguments to the script may also be included.
^T - A starting ^T means: send the text which follows
^T to the terminal.
# - The text which follows `#' is a
comment and is not sent. {\# = # Itself}
11. SAVING OPTION CHANGES TO COMX ([M:F3])
To save any changes to the options in the various menus, so that
they will be effective the next time you start COMX, press
[M:F3].
12. RUNNING A SCRIPT FROM WITHIN COMX ([M:F4])
You can execute a script from the main menu or terminal-mode by
pressing [M:F4]. You will be asked for the name of the script. If
you just press <Enter>, the last script (if there was one) will
be rerun along with any arguments which you supplied previously.
Pressing <Esc> will abort the operation. Arguments can be
supplied after the script name as discussed above for command
line $Arguments (See Startup Options; don't include `--'). You
should be aware that if no arguments are supplied to the script,
then all $Variable values from the previous invocation will be
retained. However, if one or more arguments are supplied, e.g.,
send file1 file2
then, in this case, $1 and $2 in the script, `send.cex', will be
replaced with `file1' and `file2', respectively, and all other
$Variables will be cleared. (See script sections. Also see the
description of the .nc script command which can be used to modify
this replacement strategy.) You need not include the .CEX
extension in the script name. Spaces can be included in an
argument by representing them with ^S.
13. SENDING TERMINAL-MODE CHARACTERS TO THE PRINTER ([M:F5])
Pressing [M:F5] will cause any subsequent incoming terminal
characters to be echoed on the printer (# bits determined by
[M:Alt-T,E]). This key also turns off echoing. This kind of ON-
OFF key action is termed `toggling'.
14. SAVING TERMINAL-MODE CHARACTERS IN A FILE ([M:F6])
20 Pressing [M:F6] will toggle a save of all subsequent incoming
terminal characters to a file. (The default file is `comx.dwn'.
The directory can be specified in [M:F2,D].) Characters will be
appended to the contents of this file if it already exists. You
can change the default file name by hitting [M:F2,G]. The number
of character bits is determined by [M:Alt-T,E]. Except for the
`Ansi' terminal emulation type, emulation escape sequences will
not be saved.
15. DOS ACCESS ([M:F7])
You can access DOS and do anything that you would normally do in
DOS. From DOS,
Type: exit <Enter> to return to COMX.
16. ABORTING A FILE TRANSFER PROGRAM ON ANOTHER COMPUTER
([M:Alt-A])
If you have started Kermit, X/Ymodem or Modem7 on another
computer and decide that you don't want to continue. You can
prematurely abort the program on that computer by hitting [M:Alt-
A]. Select the appropriate protocol at the prompt.
17. CHANGING SERIAL (COM) PORTS ([M:Alt-C] or [M:F2,A])
If you have more than one serial port, you can move between
successive ports by hitting [M:Alt-C]. Port settings are those
which you have chosen for each port using [M:Alt-U]. (Discussed
above.) You can move to specific ports by hitting [M:F2,A].
18. CHANGING PRINTER (LPT) PORTS ([M:F2,B])
If you have more than one parallel port, you can move to a
specific port by hitting [M:F2,B].
19. INVOKING A WORD PROCESSOR OR EDITOR FROM WITHIN COMX
([M:Alt-E])
You can press [M:Alt-E] to invoke your favorite word processor or
editor. In order to do so, however, its name and any arguments
must be specified in [M:F2,F]. In entering a name in [M:F2,F],
you can also include any arguments, along with the special `-?'
argument (any number) described for $Arguments above (Startup
Options). The original DOS environment (SET=VALUE) is also
provided to the program. The program also may be something other
than an editor or word processor.
20. HANGING UP THE PHONE ([M:Alt-H])
On occasion, the termination of a session on another computer or
a network will leave your modem "on line". In these cases it will
be necessary to press [M:Alt-H]. (COMX will automatically hangup
the phone if you exit COMX and the modem is still "on line".) By
default, COMX causes the DTR line to drop and then rise. In some
instances this will not work, and you will need to define a
21 script which, in turn, causes a hangup condition. If this is the
case, you should enter the name of the script in [M:F2,J]. For
`broadband' networks, the script should be `NETBRK.CEX'; however,
a script is also provided, `HANGUP.CEX', which will send
appropriate Hayes commands to your modem. (You need not include
the .CEX extension with its name.) If a script name is given in
[M:F2,J], COMX will automatically use this script when it needs
to do a hangup.
21. LOGGING FILE TRANSFERS ([M:Alt-L])
During uploads and downloads, all received characters (packet
control characters included) are saved in a file, `COMX.LOG', in
the current directory. This is primarily useful for debugging
protocols from other computers.
22. TURNING THE MAIN MENU OFF AND ON ([M:Alt-M])
You may be used to hitting certain keys in another program, and
find yourself accidentally hitting these keys in COMX. Well,
there's a solution. You can toggle the main menu off or on by
hitting [M:Alt-M]. This will deactivate all main menu keys BUT:
[Alt-C], [Alt-D], [Alt-H], [Alt-M], [Alt-R], [Alt-X], [F1], [F5]
and [F10].
23. PRINTING A FILE DURING ITS DOWNLOAD ([M:Alt-P])
If you are downloading a text file and want to have it printed as
well, press [M:Alt-P]. Please note: if your printer is not ready
to receive characters, this option will be turned off without
notice. Normally characters are sent to the printer as they are
received; however, if a print spooler program is defined in
[M:F2,I] then the file will be sent to the spooler after the
download has completed. The installation default is the DOS
spooler, PRINT. This option remains in effect until it is turned
off.
24. DISPLAYING A FILE DURING ITS DOWNLOAD ([M:Alt-S])
If you are downloading a text file and want to have it displayed
on the screen as well, press [M:Alt-S]. This option remains in
effect until it is turned off.
25. REDIALING A PHONE NUMBER ([M:Alt-R])
If you have dialed a number from the autodial directory or from a
script, you can redial the number by pressing [M:Alt-R]. A
previous script will not be rerun.
26. LISTING THE FILES IN A DIRECTORY ([M:F2,M])
You can get a listing of files in a directory by pressing
[M:F2,M]. Just enter the name of the directory at the prompt or
<Enter> for the current directory. If you capitalize the
22 directory name, a detailed description of each entry is
displayed, otherwise, you will see an abbreviated listing.
27. VIEWING A TEXT FILE ([M:F2,N])
The contents of a file can be viewed by pressing [M:F2,N].
28. HOST-MODE ([M:F2,L])
COMX provides a primative host-mode. Upon entering host-mode,
COMX will optionally reset your modem, so that it will answer any
incoming calls from another computer. Once someone has dialed
into your computer and a connection has been established, the
person at the other end can then send commands to your computer
to perform specific operations on it. These commands are a subset
of COMX script file commands. They are listed here for reference,
but are described more fully under the sections dealing with
script files.
Command Listing (A Subset of Script Commands)
.do <prot> <t|b> [file] - Download [file(s)] ONTO HOST.
.ex - Causes host to exit COMX.
.he - Help.
.ls [dir] - List directory [dir] entries on host.
.ru <cmd> - Run a program or DOS command <cmd> on host.
.sf <file> - Show (view) a <file> on host.
.tc [yes|no] - Toggle capture of terminal characters (from
remote site) to a file.
.tf <file> - Terminal characters, after `.tc yes', go
into <file>.
.te <type> - Set terminal emulation <type> on host.
.up <prot> <t|b> <files> - Upload <file(s)> FROM HOST.
.PW <user> <password> - Enable use of the various commands.
Other Available Commands:
.as .fi, .gr, .kl, .km, .pe, .xo, .xt, .xz, .yx, .zx
{See script file sections for a full description of usage.}
All other text typed by the person at the other end is echoed to
your screen. Similarly, anything that you type is sent to the
other computer.
If the person on the other end types: .help
then the information present in the file, `COMXHELP.TXT', is sent
to the other side. (Your computer will also beep several times.)
You can edit this information as you wish.
Two script files, `HOSTON.CEX' and `HOSTOFF.CEX', are
provided. They are used to correctly set your modem and COMX for
host-mode. These files may be edited, if you like, to customize
your host-mode operations. Their names may also be changed
([M:F2,K]). You may want to study these files to see exactly what
they do.
The other end can break the connection by either hanging up
23 the phone or by typing <Ctrl-Z>. Your modem will be returned to
the autoanswer mode and COMX system parameters will be reset in
case they were changed by commands issued from the other side.
If you hit <Esc>, host-mode will be terminated. If you hit
<Ctrl-Z> while in host-mode, you will exit the host-mode without
hanging up the phone. You could do the latter, if you wanted to
maintain a connection with the other computer after going back to
your main menu. Hitting <Ctrl-Z> will change several of your
terminal emulation parameters including duplex type ([M:Alt-T,I])
and CR/LF translation ([M:Alt-T,D]). These parameters will be
reset to their original state if you return to host-mode. Please
note that if you do maintain a connection with the other machine,
any characters which are typed by the other side are not echoed
back to that side by COMX. The latter occurs only in host-mode.
The serial port settings used by the other computer should
agree with those you are using; COMX will not adjust to
differences in baud rate.
The .tc command could be used to save messages in a specific
file for someone on the host computer to read at a later time. A
default .tf filename is set in `hoston.cex'.
29. USING COMX UNDER DESQview (V. 2.2/2.3) AND WINDOWS 3.0
COMX can be used under DESQview. The appropriate settings
for COMX in DESQview's program setup menu are:
Program Name - mcomx.bat[3]
Memory Size - 130K {See note below.}
Writes to Screen - N
Virtualize Text/Graphics - Y {Use COMX's /P option
if `N'.}
Displays Graphic Information - N
Can be Swapped Out of Memory - N
Requires Floppy Disk - N
And in the F1 Submenu:
Text Pages - 1
Close on Exit to DOS - Y
Allow Close Window - N
Uses Math Coprocessor - N
You should adjust the clock-ticks in the DESQview setup program
to give the background process more time (e.g., 3-fore-, 6-
background). I would suggest that you load COMX first before any
other program.
If you are using a mouse, you should restrict the COM port
[3] `MCOMX.BAT' (or whatever you want to call it) is the DOS
batch file that DESQview will use to start COMX. It must have in
it the following lines:
dvansi {DESQview needs its own version of `ansi.sys'}
comx
24 to the one on which you will be communicating. To do so, Enter:
-o<COM port #> ( e.g. -o1 ) in the parameter field.
You can run multiple versions of COMX in different DESQview
windows. To do so, you need to set up a different batch file for
each window and use COMX's /O option. For example,
MCOMX1.BAT -
dvansi
comx /O1 {Only COM1 will be used.}
MCOMX2.BAT -
dvansi
comx /O2 {Only COM2 will be used.}
Under Windows 3.0 you can optimize COMX's performance by
creating a .PIF file. Change the following items from their
defaults:
Optional Parameters:
If you are using a mouse, you should restrict the COM
port to the one on which you will be communicating. To
do so, Enter: -o<COM port #> ( e.g. -o1 ) for this
option. Failure to specify this may result in damage to
Windows groups.
For 386 Enhanced Mode Usage:
KB Desired: 130 {See note below.}
Display Usage: Windowed
Execution: Background
Please Note: To be able to 1) access DOS, 2) invoke an
editor/word processor, or 3) spool a downloaded file to the
printer using a spooler program, you will need to increase the
amount of memory which is available to COMX. I would recommend
starting with 200 K.
30. CREATING A 132 COLUMN DISPLAY / MULTI-COM PORT DRIVER
The utility program, CXDRIVER (Copyright (C) 1990-1991 Samuel A.
Sholl) can be used to create a driver, `COMX.DRV', (created in
your bootup directory) which is loaded automatically when COMX
starts. This program will work on 8086-80486 machines. CXDRIVER
should be used on the disk drive on which you have installed
COMX. There are two cases in which you will need to create this
driver: 1) If your VGA card uses an extended DOS INT 10H function
(greater than 0x0f) to get and set the video mode for 132 column
display and 2) if you have more than two COM ports (up to 15).
Usually, you will need additional hardware to to support more
than two COM ports. Multiport boards from Digiboard Inc. are
recommended.
25 Summary of Usage
CXDRIVER </I<FILE>> [/D<VGA>] [/S] [/T] [/W]
Where:
/I<FILE> = <File> containing driver creation
instructions.
/D<VGA> = Default INT 10H values should be used -
(<VGA>=n for normal/standard; <VGA>=7 for
Video 7.)
/S = Execute silently (no messages).
/T = Test only; don't create driver.
/W = Ignore warnings and create driver.
Normally, the driver is not created if there
are warnings or errors.
You will need to create a text file (<File>) containing
instructions for the creation of the driver. These
instructions will be interpreted by CXDRIVER and the file,
`\comx.drv' will be created if there are no errors or
warnings. Instructions which should be placed in this file
are described below.
DRIVER CREATION INSTRUCTIONS IN <FILE>:
All specified values should be in hexidecimal. See the file,
`cxdriver.txt', for an example.
FOR 132 COLUMN DISPLAY (OPTIONAL, IGNORED IF /D USED):
COM_Port#:key_word=value (Hexidecimal)
#:a8250 = I/O address (base) of an 8250 type UART for the
port. (COM1=0x3F8, COM2=0x2F8)
#:intn = Interrupt number for the port. (COM1=C, COM2=B)
#:a8259 = I/O address (base) of the 8259A interrupt
controler for the port. (COM1=COM2=0x20)
#:irqn = Interrupt request number for the port. (COM1=4,
COM2=3)
#:break = Duration of the break signal. (Multiple of 55
ms) (Default=2)
#:modem = 0 or 1. This determines whether output requires
modem status signals to be asserted. (0=NO, 1=YES)
(Default=0)
#:otime = Value. Determines timeout period for polled
output. (Multiple of 55 ms) (Default=0)
#:itime = Value. Determines timeout period for polled
input. (Multiple of 55 ms) (Default=0)
#:shirq = Address. For devices which share a single
interrupt request line, this is the address of the
status port which must be read to determine which
of the UARTs requested input. (Default=0)
#:shmask = Bit Mask. Bit mask which will be compared with
the value read from the status port on a shared
26 interrupt multi-port board. The value should
indicate which port requested the interrupt.
(Default=0)
FOR MULTI-PORT OPERATION (OPTIONAL):
key_word=value (Hexidecimal) or Register
For setting up registers for setting a NEW video MODE:
s_moder = al, ah, bl, bh, cl, ch, dl or dh
{Register containing video MODE value on function
entry.}
s_al = Initial value in register al.
s_ah = Initial value in register ah.
s_bl = Initial value in register bl.
s_bh = Initial value in register bh.
s_cl = Initial value in register cl.
s_ch = Initial value in register ch.
s_dl = Initial value in register dl.
s_dh = Initial value in register dh.
For setting up registers for getting the CURRENT video MODE
& # COLUMNS:
g_moder = al, ah, bl, bh, cl, ch, dl or dh
{Register containing video MODE value on function
exit.}
g_colr = al, ah, bl, bh, cl, ch, dl or dh
{Register containing COLUMN# value on function
exit.}
g_al = Initial value in register al.
g_ah = Initial value in register ah.
g_bl = Initial value in register bl.
g_bh = Initial value in register bh.
g_cl = Initial value in register cl.
g_ch = Initial value in register ch.
g_dl = Initial value in register dl.
g_dh = Initial value in register dh.
If not set, defaults are either `al' or zero depending on
the variable.
31. SCRIPT FILES
31.1 General Information
This is one of the most powerful features of COMX. A script file
is a text file, which you create using your word processor. (Save
as a DOS text file.) The script file contains commands which
cause COMX to do something. Script files must have a .CEX
extension, although you don't have to specify this extension when
27 they are invoked.
Generally, when a script program is running, any characters
which you type on the keyboard are passed through to the other
side. This is useful, e.g., if you don't want to include a
password in your script.
There are three ways to invoke a script: 1) from the DOS
command line (see Page 9), 2) by hitting [M:F4] (see Page 20), or
3) from your autodial directory (see Page 14). All of these
methods have been described above.
COMX script files should be located either in the root
directory of your bootup drive or in the directory specified in
[M:F2,C].
The COMX script language is described by a set of DOT
commands, which may be followed by required (<...>) or optional
([...]) argument(s), e.g.,
.ds hello there^M^J
The number of spaces or tabs before the command is not important.
Any other line of text is ignored by the script processor. In
addition, I usually use `#' as the first character of a line to
designate a comment. (This is processed more quickly.) Blank
lines are also permissible.
Only the first TWO characters after the DOT are important, e.g.,
`.te vt100' would be the same as `.terminal vt100'
The CASE of the characters in the command IS meaningful. e.g.,
`.abort' is not the same as `.ABORT'.
A number of script files have been provided in the COMX
distribution package, and they should be studied for examples of
command usage.
31.2 $Variables
$Variables can be imbedded within script commands. There are
several types of $Variables:
$1 ... $30 {Script invocation arguments 1-30}
$0 {From .gi command input}
$n {The number of script invocation arguments}
$f {Name of file just up/downloaded including the
directory}
$F {Name of file just up/downloaded not including the
directory}
$$ {$ Itself}
These variables and how they are used can be best described by
the following examples:
.ds Script Argument-1: $1, Argument-2: $2^M^J
- $1 and $2 are replaced with the first and second
28 arguments, respectively, on the script invocation line.
.ds Number of Script Arguments: $n^M^J
- $n is replaced with the actual number of arguments on
the script invocation line.
.ds Input to the .gi Command was: $0^M^J
- $0 is replaced with input to a preceding .gi command.
.ds The File Just Sent was: $f^M^J
- $f is replaced with the name of the last
up/downloaded file.
.ds The Dollar Sign Itself Can be Displayed, e.g. $$100.0^M^J
For more discussion on the nature of these variables and their
initialization, see the above information on the invocation of
scripts.
31.3 Jump Labels
You can jump to specific labels in the script file using a
command such as: .op ju 3
These labels consist of a DOT plus two digits, e.g.,
.01 {Labels can range from .01 to .30}
To use these labels in a jump command, you specify only the
integer part as the jump argument, e.g.,
.09
# something here
.op ju 9 {Don't include a leading `0'.}
Labels are local to a given script and cannot be used to jump
between merged scripts.
31.4 Toggling Activity
Some script commands simply toggle a COMX environmental parameter
between `YES' and `NO'. These commands are usually descibed as,
e.g., .command [YES|NO], where `|' means OR. The argument `YES'
or `NO' is optional. An example would be: .b7 YES
One could also use `ON' or `OFF', or `1' or `0' in place of `YES'
or `NO'. (Case is not important.) Omitting the argument would be
the same as specifying `YES'.
31.5 Error Return Values from Commands (ERRVAL)
Specific commands may return a TRUE or FALSE ERROR condition
which can be tested for by using an .opcode command (.op je; .op
jn). If a command returns an error value, (ERRVAL) will be
indicated after the command or described under the command.
29 31.6 Basic Commands
If a command has a menu-equivalent, it is indicated at the end of
the description.
.:= $$<n> <string> Assign <string> to the $Variable <n>.
.abort Abort the current script. If the current script is
a merged script, you will be returned to the
previous script. (See .me). (ERRVAL=TRUE)
.ABORT Abort all scripts which are currently running. You
will be returned to the main menu.
.AE [YES|NO] Abort on error. (Default=YES). Normally, COMX will
abort a script if an ERRVAL of TRUE is returned
from a specific script command. You should set .AE
to NO if you wish to do complex branching using
`.op je' or `.op jn'. (See below.) This command is
local to the script in which it is used. If an
unconditional jump command (e.g., `.op ju')
follows immediately after a command with an ERRVAL
designation, the ERRVAL from that command is
ignored regardless of how .AE is set.
.as <parameters>
Specify ascii-send (upload) <parameters>.
<Parameters> should be a string with the format:
<block_time>,<l or p>,<block_size>,<char_time>
(e.g. 1,p,128,2 [no spaces]). Where <block_time>
is the delay time between packets/lines (0-5
secs.); <l,p> designates that either a line (l) or
packet (p) is sent at a time, <block_size> (1-1000
bytes) specifies the size of a packet (if `p'
chosen) and <char_time> is the delay time between
characters (0-100 multiple of 55 ms). These
parameters can be saved by pressing [M:F3]. There
is no way to enter them from a menu. (See
`tools.cex'.)
.b7 [YES|NO] 7-Bit mask for X/Ymodem file transfers. YES = use
only 7-bits, NO = 8-bits (normal way).
([M:F2,O,J])
.cd Carrier detect. If a carrier signal is detected,
ERRVAL=FALSE, else ERRVAL=TRUE.
.com [n] COM port switch. Move to next serial port
available if no [n] is given, else move to the
specific [n] COM port. ([M:F2,A)
.CO <str> Modem CONNECT string <str>. ([M:F2,H])
.cs Clear current video screen and send cursor to the
home position.
.cv <n> Clear $Variable, $<n>, where n = 1-30. If n = -1,
all $Variables will be cleared. (Example: .cv 5;
.cv -1).
.db [YES|NO] Destructive backspace in terminal emulation.
([M:Alt-T,F])
.dial <str> Dial the phone number <str>. There should be no
spaces in <str>. (Example: .di 1,8001119999). If
you do not include a Hayes prefix (e.g. ATP) in
<str>, then `ATD' is prepended to <str>. The
30 script processor waits for a carrier detect signal
before continuing unless a `~' is the first
character of <str>. (The `~' is ignored.) This
command is ignored if the script is invoked from
the autodial directory. If a connection is made
with the other computer, ERRVAL=FALSE, else
ERRVAL=TRUE. (See .gb command.)
.down <protocol> <t or b> [file]
Download a [file] using <protocol>, where
<protocol> = k,x,xc,y,yc,m7,yg,ya or a; <t or b> =
text or binary file (you can use `i' for image
instead of `b'); [file] = name of received file if
this is a nonbatch protocol. (See .up) (ERRVAL)
([M:PgDn])
.ds <str> Display string <str> on your terminal. The
formatting of <str> follows the same rules as
described under Section 10.3, "Control Character
Representation". In addition, you may include
trailing spaces in <str> by representing them with
`^S' and beginning spaces by preceding them with a
`"'. (Normally, trailing and beginning spaces are
trimmed.) Note: you must specifically include a
CR/LF EOL designation in <str>. (Example: .ds " --
^GHello There^M^J).
.du [YES|NO] Duplex - half. YES = half duplex, NO = full
duplex. ([M:Alt-T,I])
.editor <name> The <name> of the editor or word processor to
invoke after hitting [M:Alt-E]. ([M:F2,F])
.escape Test to determine whether <Esc> was hit.
ERRVAL=TRUE if <Esc>, else ERRVAL=FALSE.
.exit Exit COMX.
.file <path> Test for the existence of a given file or
directory <path>. (ERRVAL)
.flushinput Flush any characters from the current serial port
input buffer.
.fo [YES|NO] Force binary/text mode query on file uploads.
([M:F2,O,H])
.gb [n] Get the modem's "CONNECT" baud rate and reset COMX
to it. (See discussion under Section 8.2.5.) [n] =
Number of seconds in which to look for the
"CONNECT" baud rate after dialing the number.
(Default = 3 secs.) The .gb command MUST be placed
BEFORE the .dial command. This command is ignored
if the script is invoked from the autodial
directory, although if you've defined a "CONNECT"
string in [M:F2], switching is done as if .gb were
in your script.
.gi [prompt] Get input from keyboard following [prompt]. The
input can then replace the special $Variable, $0.
[Prompt] can be formatted as described under the
command, .ds.
.gr [YES|NO] Graphics character display capability in terminal
emulation. ([M:Alt-T,E])
.hangup Hangup phone. ([M:Alt-H])
.help Help requested from a remote computer while in
31 host-mode. This command can also be used to
display the contents of the file, `comxhelp.txt',
which should be located in the root directory of
your bootup drive.
.hostmode Activate host-mode. ([M:F2,O,L])
.ka [YES|NO] Keep aborted-download files. ([M:F2,O,A])
.kl [YES|NO] Kermit - large block. ([M:F2,O,P])
.km <n> <str> Key-macro. Assign <str> to key-macro buffer
([M:F1]) entry <n>. The formatting of <str> is
described under the section dealing with key-
macros. (Example: `.km 16 mail^J' assigns `mail^J'
to [M:F1,1,F6]).
.ls [dir] List files in the directory [dir]. If [dir] is
capitalized, you will get a detailed description
of each file in the directory. (Default = current
directory.) ([M:F2,M])
.main [YES|NO] Main menu display. (M:Alt-M)
.mi <c1> <c2> Map terminal input character <c1> (ascii value) to
character <c2>. For example, .mi 13 10 will
change all incoming carriage returns (13) into
line feeds (10). This will not map characters in
file transfers. All characters will be reset to
their original ascii values when a terminal is
reset using the .term or .restore command. Setting
<c1> to -1 will also reset all character values.
.mo <c1> <c2) Map terminal output character <c1> to character
<c2>. (See the description of.mi which also
applies to .mo). This does not affect characters
sent using the .tr command or in file transfers.
.merge <script file> [list of $Arguments]
Merge another script file into the current one and
execute. If the script runs successfully,
ERRVAL=FALSE, otherwise, ERRVAL is determined by
the ERRVAL's returned by individual commands in
the merged script. It can also be influenced by
such commands as, .abort, .AE and .RE in the
merged script. The $Arguments fill $Variables in
the merged script as described above. $Variable
values will remain in effect even after exiting
the script. Merges can be up to 5 levels deep
including the initial script.
(Example: .me sendf $1 file2.txt)
.mn <n> Minimum number <n> of command line $Arguments
needed to execute the script correctly. This
command should be placed at the top of the script
file. (ERRVAL=TRUE if the requirement is not met.)
.nc [YES|NO] No clearing of remaining $Variables if one or more
$Arguments are included on the script invocation
line. (NO=Default).
.opcode <code> Perform a specific operation <code>. (See
following sections.)
.PARSE <str> Parse the string <str> into separate arguments and
place them on the COMX stack. (See sections on
stack commands.) The arguments can be separated by
`,', ` ' or `;' Literal separators can be preceded
32 by a backslash, e.g., `\;'. The last argument is
on the top of the stack. Spaces within an argument
can be represented by `^S'. The number of
arguments is returned in $n.
.pause <n> Pause for <n> seconds before continuing script
processing. (ERRVAL=TRUE if <Esc> hit.)
.pe [YES|NO] Print downloading files. ([M:Alt-P])
.PE [YES|NO] Password enable. If `YES', then in host-mode, the
remote user must issue the .PW <user> <password>
command before he/she is allowed to use the other
host-mode commands. This command could be executed
from the file, `hoston.cex'.
.PW <user> <pwrd>
If .PE has been enabled, and COMX is in host-mode,
then the remote user must issue this command
before gaining access to the other host-mode
commands. A file (`comxpwd.txt' in the root
directory of your bootup drive) must be set up to
contain the user name <user> and password <pwrd>.
A sample file is provided in the distribution
package.
.pg <0 or 1> Select page 0 or 1 for video display. The
terminal-mode page is 0; scripts are usually but
not always run on page 1.
.pi <dir> Path in. Default directory <dir> for downloaded
files. (See .po) (ERRVAL=TRUE if no such <dir>.)
([M:F2,D])
.po <dir> Path out. Default directory <dir> of files to
upload. (ERRVAL=TRUE if no such <dir>.) ([M:F2,E])
.printer [n] Printer port switch. Move to the next LPT port
available if no [n] is given, else move to the
specific [n] LPT port. ([M:F2,B])
.restore Restore all COMX system parameter values. (See
.ss)
.RETURN <n> Return from a script with the value <n>. If the
value is not zero, ERRVAL after the .merge command
which invoked the script is set to FALSE, else
ERRVAL=TRUE.
.run <prompt> <command>
Run command. This version of .ru is the usual form
of the command. The <command> is run on the other
computer. The script processor waits for the
<prompt> from the other computer before continuing
script execution. The exception to this is when
you specify that the prompt is `0' (zero). In this
case, script processing continues without delay.
The processor will wait for up to 500 minutes for
<prompt>. (ERRVAL=TRUE if a timeout occurred while
waiting for the <prompt>.)
.run <command> Run command. The second version of the run command
is relevant when COMX is in the host-mode and
receives this command from the other computer. In
this case, the <command> is a DOS command or
program which will be run on the host machine.
(ERRVAL=TRUE if DOS was not able to execute the
33 <command>.)
.rl <command> Run local command. The <command> is a DOS command
or another program. (ERRVAL)
.rt [YES|NO] Relax timeouts for downloads. ([M:F2,O,F])
.sa <n1> <n2> <n3> <n4> <n5> <n6> <n7>
Set all. Various COMX file transfer parameters can
be set. These include:
<n1> = Kermit: 8-bit character prefix.
<n2> = Kermit: control character prefix.
<n3> = Kermit: end of packet character.
<n4> = Kermit: packet initiation character.
<n5> = Kermit: number of checksum bytes.
<n6> = Maximum transfer timeout interval
(secs).
<n7> = Maximum number of packet retries.
Values <n1> ... <n4> are ascii. You must include
all parameter values.
(For default settings: .sa 38 35 13 1 3 10 10).
.sb Send break signal. ([M:Alt-B])
.sc [YES|NO] Screen display of downloading file. ([M:Alt-S])
.sd <script> Script <script> to use for hangups/disconnects.
([M:F2,J])
.SD <dir> Directory <dir> containing script files.
([M:F2,C])
.sf <file> Show file <file> on screen. ([M:F2,N])
.show [YES|NO] Show serial port incoming characters during script
execution. (YES=Default).
.sn [YES|NO] Set newline (LF) generation to automatic on
receipt of CR (or LF) in terminal-mode. ([M:Alt-
T,D])
.ss Save all COMX system parameter values to be
restored by the .restore command.
.sw [YES|NO] Screen wrap in terminal-mode. ([M:Alt-T,C])
.sy <val> <str>
Synchronize. This is like .wa (see below) except
that if the expected string <str> is not received
over the serial port within 5 seconds after a
carrier signal is detected, a <val> (ascii value
of a character) is sent and the wait begins again
for 40 seconds. The <val> is normally 13 (CR) but
may be any other character (e.g., space = 32).
(See .wait) (ERRVAL)
.terminal <terminal type abbreviation>
Set the terminal emulation type. (See Section 7.1
for abbreviations.) (Example: .te adm5) ([M:Alt-
T,A])
.tc [YES|NO] Data capture of terminal characters to the file,
`comx.dwn' (or whatever the name given in
[M:F2,G].) This command toggles the capture ON or
OFF. ([M:F6])
.tf <file> Data capture of terminal characters to file
<file>. (Default=`comx.dwn'). (See .tc) ([M:F2,G])
.tr <str> Transmit the string <str> over the serial port.
34 The formatting of <str> follows the same rules as
described under Section 10.3, "Control Character
Representation". See the description of .ds for
additional rules, specifically regarding a
beginning `"' and ending spaces.
.uart <str> Uart-serial port values set to <str> for the
current COM port. <Str> should be in a format
like, e.g., 1200e17 where in this case,
1200 = Baud rate.
e = Parity (even, 1-letter; also:
o,n,m,s).
1 = Number of stop bits (also: 2).
7 = Word length (also: 5,6,8).
([M:Alt-U])
.upload <protocol> <t or b> [list of files] ([M:PgUp])
Upload a file(s). (See .do for a description of
the format of this command.) The last argument may
include one or more file names. If no file name is
given, you will be asked for the name(s) of the
files. This applies only if you are not in host-
mode. For the latter, file name(s) are manditory.
(ERRVAL)
.wait <str> Wait for a string <str> to be sent by the other
computer. The formatting of <str> follows the same
rules as described under Section 10.3, "Control
Character Representation". See the description of
.ds for additional rules, specifically regarding a
beginning `"' and ending spaces. The script
processor will wait up to 40 seconds. (See .WT and
.sy) (ERRVAL)
.wide <str> Allow 132 column display. <Str> is typically in a
format like, 55 1
(See Section 7.3, Option [H]) ([M:Alt-T,H])
.WT <n> <str> Wait for a maximum of <n> seconds for a string
<str> to be sent by the other computer. (See the
.wait command for information on the formatting of
<str>.) (ERRVAL)
.xon-xoff [YES|NO]
Use underlying Xon/Xoff protocol on file uploads.
([M:F2,O,I])
.xt [YES|NO] Use Xon/Xoff protocol with terminal emulation.
([M:Alt-T,G])
.yz [YES|NO] End-of-line (EOL) LF to CR translation for all
text file uploads. (NO=Default). ([M:F2,O,D])
.xz [YES|NO] EOL Specification for Kermit & X/Ymodem text file
uploads is LF (YES), else EOL is CR/LF.
(NO=Default). ([M:F2,O,B])
.zx [YES|NO] EOL Specification for Ascii text file uploads is
CR/LF (YES), else EOL is LF (NO=Default).
([M:F2,O,C])
31.7 Stack Commands (.op __)
31.7.1 General Information
35 COMX has its own script stack. (Actually there are two stacks,
but we'll get to that later.) Script commands can be used to
manipulate the contents of this stack. You can also save the
contents of $Variables on the stack. First, however, let me
summarize the notation which I will be using to describe the
stack commands. I'll represent the COMX stack by the following:
Stack -
(Before operation) (After operation)
n3 n2 n1 --> n3 n2 n1 {n1 ... n3 are values on the
stack.}
In this case, the value, n1, is on the top of the stack, and the
value, n3, is on the bottom of the stack. In addition to the
changes to the stack which result from the various operations,
there are several COMX system variables whose values also can be
influenced by stack operations:
ERRVAL - Descibed above.
FLAG - Holds a TRUE/FALSE value resulting from a stack
test operation.
HFLAG - The same as for FLAG, but for operations
performed on the hardware stack (more later).
These variables are local to a given script. In the command
descriptions which follow, I will indicate whether a particular
variable is affected by the results of the described operation.
The values on the stack can be of two types - integer (e.g.
12) and string (e.g. "12 is twelve"). Type consistency is checked
before the stack operation is performed.
All stack operations are preceded by: .opcode
followed by the name of the specific operation; for example,
.op plus
If the first character of the operation is capitalized (e.g., .op
Plus [or .op PLUS]), then the operation will relate to the
auxiliary COMX stack which we will call the `hardware' stack (for
lack of a better name). The following description of stack
operations also can be applied to this auxiliary stack.
Examples of the various stack operations can be found in the
script files, `STACK.CEX' and `SERVER.CEX'. These files also
demonstrate the use of stack commands to provide program flow
control. Subroutine calls can be simulated by merges (.me).
31.7.2 Math Operations on Stack Values
The following math operations are permitted. They all require at
least two integer values on the stack. These commands are
particularly useful in providing program flow control.
.op plus { n3 n2 n1 --> n3 (n2+n1) }
.op minus { n3 n2 n1 --> n3 (n2-n1) }
.op times { n3 n2 n1 --> n3 (n2*n1) }
.op divide { n3 n2 n1 --> n3 (n2/n1) }
.op increment <val> { n3 n2 n1 --> n3 n2 (n1+val) }
36 {<val> can be positive or negative.}
If the result of the operation is nonzero, FLAG (HFLAG) will be
set to TRUE, else FLAG will be set to FALSE.
31.7.3 Moving Values To, From and On Stack
.op dupe { n3 n2 n1 --> n3 n2 n1 n1 }
- Duplicates the top value.
.op clear { n3 n2 n1 --> }
- Clears the stack.
.op push <string> { n3 n2 n1 --> n3 n2 n1 string }
- Pushes a <string> onto the stack.
.op push #<n> { n3 n2 n1 --> n3 n2 n1 n }
- Pushes an integer <n> onto the stack.
.op pop { n3 n2 n1 --> n3 n2 }
- Pops a stack value.
.op pop $$<n> { n3 n2 n1 --> n3 n2 }
- Pops a stack value into the $Variable <n>.
For both versions of pop, if there was something to pop,
FLAG (HFLAG) will be set to TRUE, else FLAG=FALSE.
.op rotate <p1> <p2> { Rotate specific stack values at
positions <p1>, <p2> }
- For example, given the stack: n4 n3 n2 n1,
the command: .op 2 3 would produce the arrangement:
n4 n2 n3 n1
.op sub <p1> <p2> <case> { string --> substring }
- This command takes the STRING on the top of the stack and
extracts a substring beginning at postion <p1> (1=first
character) and ending at position <p2>, inclusive. It will
also convert characters of the resulting substring to lower
case if <case>=1, or upper case if <case>=2. If <case>=0, no
case conversion occurs.
Except for `.op pop', FLAG (HFLAG) is not affected by these
operations.
31.7.4 Comparison of Stack Values
In all cases, there must be two values on the stack. The stack
values are not affected by the comparison, however, FLAG (HFLAG)
is set according to whether the comparison returns TRUE or FALSE.
The top two values on the stack must be of the same type (either
integers or strings).
.op equal { n1 = n2 } {n1 is on the top of the stack,
n2 is below.}
.op nequal { n1 <> n2 }
.op le { n1 <= n2 }
.op ge { n1 >= n2 }
.op gt { n1 > n2 }
.op lt { n1 < n2 }
31.8 Jump Commands (.op j_)
37 Please read the section on jump labels (Section 31.3) before
continuing. All jump operations are preceded by .opcode.
You can jump to specific locations in the script by using
the commands described below. If the first character of the `jt'
or `jf' operation is capitalized (e.g., .op Jt), then the
operation will relate to HFLAG rather than FLAG.
.op ju <label>
- Jump unconditionally to <label>. Example: .op ju 5
.op je <label>
- Jump to <label> if an error (ERRVAL=TRUE) occurred as the
result of the previous script command.
.op jn <label>
- Jump to <label> if no error was generated by the previous
script command.
.op jt <label>
- Jump to <label> if the previous stack operation set FLAG
(HFLAG) to TRUE.
.op jf <label>
- Jump to <label> if the previous stack operation set FLAG
(HFLAG) to FALSE.
ERRVAL will be set subsequently to FALSE by all of these jump
operations. FLAG (HFLAG) is not affected by these operations.
If a jump is made to a specific <label>, the script
processor goes back to the beginning of the script file and
begins reading successive lines, without processing those lines.
It will continue to do so until it encounters the given <label>.
At this point, processing will resume.
32. TIPS AND TRICKS
1) Color attributes for the status line are identical to
those for reverse video and can be changed using the /C
startup option.
2) The ascii code which is sent when the backspace key is
hit is normally 8. However, this can be changed to e.g. 127
(delete) by writing a simple script containing the command:
.mo 8 127 {To change a backspace to delete. Also see
`tools.cex'.}
3) Parameters associated with ascii file uploads can only be
changed from a script file using the command: .as
<parameters> {Also see `tools.cex'.}
4) It will be to your advantage to use an underlying
Xon/Xoff protocol ([M:F2,O,I]) if you perform ascii uploads.
5) [M:F9] can be used to update the CONNECT status on the
status line.
6) [PrintScrn] will print the current screen.
7) If you exit COMX and you receive the message that system
38 parameter changes have not been saved, you may be
surprised - particularly if you did not deliberately change
anything. Don't worry, another computer or a script file may
have changed things for you. If this is the case, you
probably should proceed to exit COMX without taking any
further action.
8) If your phone remains "on line" after you exit COMX or
press [Alt-H], your modem can't respond correctly to certain
changes in serial line status. To alleviate this problem, go
to the F2-Menu and under option [J] enter: hangup
Exit the F2-menu and press [F3] to save your changes.
39 33. ASCII CHARACTER SET AND ANSI.SYS ATTRIBUTE
ESC SEQUENCES
Ascii Character Set:
0 ^@ (NULL) 17 ^Q 34 " 51 3 68 D 85 U 102 f 119 w
1 ^A 18 ^R 35 # 52 4 69 E 86 V 103 g 120 x
2 ^B 19 ^S 36 $ 53 5 70 F 87 W 104 h 121 y
3 ^C 20 ^T 37 % 54 6 71 G 88 X 105 i 122 z
4 ^D 21 ^U 38 & 55 7 72 H 89 Y 106 j 123 {
5 ^E 22 ^V 39 ' 56 8 73 I 90 Z 107 k 124 |
6 ^F 23 ^W 40 ( 57 9 74 J 91 [ 108 l 125 }
7 ^G (BELL) 24 ^X 41 ) 58 : 75 K 92 \ 109 m 126 ~
8 ^H (BSP) 25 ^Y 42 * 59 ; 76 L 93 ] 110 n 127 DEL
9 ^I (TAB) 26 ^Z 43 + 60 < 77 M 94 ^ 111 o
10 ^J (LF) 27 ^[ 44 , 61 = 78 N 95 _ 112 p
11 ^K 28 ^\ 45 - 62 > 79 O 96 ` 113 q
12 ^L (FF) 29 ^] 46 . 63 ? 80 P 97 a 114 r
13 ^M (CR) 30 ^^ 47 / 64 @ 81 Q 98 b 115 s
14 ^N 31 ^_ 48 0 65 A 82 R 99 c 116 t
15 ^O 32 SPACE 49 1 66 B 83 S 100 d 117 u
16 ^P 33 ! 50 2 67 C 84 T 101 e 118 v
ANSI.SYS Attribute ESC Sequences:
ESC[*;...;*m {Example: ^[[31;47m Means: red letters on
white background.}
Where `*' is:
0 All attributes off
1 High intensity
4 Underline (monchrome only)
5 Blink
7 Reverse video
8 Invisible
30 Black foreground 40 Black background
31 Red foreground 41 Red background
32 Green foreground 42 Green background
33 Yellow foreground 43 Yellow background
34 Blue foreground 44 Blue background
35 Magenta foreground 45 Magenta background
36 Cyan foreground 46 Cyan background
37 White foreground 47 White background
40
34. COMX SCRIPT FILE TRACER AND DEBUGGER (CXTRACE.EXE)
The utility program, CXTRACE (Copyright (C) 1990-1991 Samuel A.
Sholl), can be used as a stand-alone program to trace and debug
your script files. This program will work on 8086-80486 machines.
Summary of Usage
CXTRACE [/C] [/D] [/I] [/L<n>] <SCRIPT FILE(S)>
Where:
/C = Assume that there is a carrier-detect
signal.
/D = While executing, display `.ds' command
output.
/I = While executing, allow for `.gi' command
input.
/L<n> = Limit the number of loop cycles to <n>
(default = 2 cycles/loop).
Notes:
$Arguments can be included on the command line by using
`"'. For example,
cxtrace "Script_file Argument_1 Argument_2"
41
35. FILE COMPRESSION AND DECOMPRESSION (CXCOMP.EXE)
The utility program, CXCOMP (Copyright (C) 1990-1991 Samuel A.
Sholl), can be used as a stand-alone program to compress or
decompress any of your files. This program will work on 8086-
80486 machines. It requires 130K of memory.
Summary of Usage
CXCOMP <OPERATION> [OPTIONS] <FILE(S)>
Operation Examples:
Cxcomp [Options] InFile OutFile
{Compress InFile to OutFile}
Cxcomp /O [Options] InFile
{Compress, overwriting InFile}
Cxcomp /D [Options] InFile OutFile
{Decompress InFile to OutFile}
Cxcomp /DO [Options] InFile1 ... InFileN
{Decompress, overwriting InFileN}
Cxcomp /R OutFile
Cxcomp /T InFile1 ... InFileN
Where Operation:
/D = Decompress instead of compress.
/O = Overwrite InFile when (de)compressing.
(`Cxcomp.bak' created if compressing.)
/R = Restore decompressed OutFile from backup,
`Cxcomp.bak'.
/T = Test InFile to determine whether it's
compressed or decompressed.
Options:
/I = The InFile to be compressed or the OutFile
from a decompression is an image/binary file.
(It's usually not necessary to specify this.)
/S = Execute silently.
/U = After compression, the Text file will be
decompressed under UNIX.
Notes:
The format of the compressed file is identical to that
produced by the UNIX program, `compress' (14 bits). An
LZW algorithm is used for compression.
42
36. ACKNOWLEDGEMENTS
DESQview is a trademark of Quarterdeck Office Systems. Windows is
a trademark of Microsoft Corp. UNIX is a trademark of AT&T Bell
Laboratories.
37. LIABILITY
The author of COMX, CXTRACE, CXDRIVER and CXCOMP assumes no
liability for lost time or damage to computer files or equipment
which may have resulted from the use of any of these programs.
Samuel A. Sholl
April 1, 1991
38. TECHNICAL SUPPORT
Technical support is available by calling, 608-277-1661. If no
one is there to take your call, please leave a message and your
phone number.
43
39. INDEX
-? 21 IBM 3101 10
132 Column 1, 12, 13, Install.cex 7
25, 26, 35 Lear ADM 3/5 10
ADDS Viewpoint 10 Menu Option Keys
Ansi.sys 4, 5, 24, 40 [M:Alt-A] 17, 21
Arguments to Scripts [M:Alt-B] 34
$Argument 7, 9 [M:Alt-C] 21
Autoanswer 24 [M:Alt-D,A] 14
Backspace 2, 12, 30, 38 [M:Alt-D,C] 14
Baud Rate 6, 15, 24, 31, [M:Alt-D,D] 15
35 [M:Alt-D,S] 15
Break 11, 13, 23, 26, 34 [M:Alt-D] 14
CD 5, 30 [M:Alt-E] 21, 31
Comx.adr 14 [M:Alt-H] 21, 31
Comx.drv 25, 26 [M:Alt-L] 22
Comx.dwn 21, 34 [M:Alt-M] 22
Comx.log 22 [M:Alt-P] 22, 33
Comxauto.cex 5, 6 [M:Alt-R] 22
COMXG.EXE 4 [M:Alt-S] 22, 34
Comxhelp.txt 4, 23, 32 [M:Alt-T,A] 10, 11,
Comxkey.txt 4, 19 34
Comxmm.set 6 [M:Alt-T,B] 12
Comxn.set 6 [M:Alt-T,C] 12, 34
Comxpwd.txt 33 [M:Alt-T,D] 12, 24,
Comxpwd0.txt 4 34
Config.sys 5 [M:Alt-T,E] 12, 20,
CONNECT 7, 14, 15, 30, 21, 31
31, 38 [M:Alt-T,F] 12, 30
Control Character 9, 19, [M:Alt-T,G] 12, 35
31, 34, 35 [M:Alt-T,H] 12, 35
CTS 5 [M:Alt-T,I] 13, 24,
CXCOMP 4, 42, 43 31
CXDRIVER 4, 13, 25, 26, [M:Alt-T,J] 13
43 [M:Alt-T] 10, 11
Cxdriver.txt 4, 26 [M:Alt-U] 13, 21,
CXTRACE 4, 41, 43 35
DESQview 1, 24, 25, 43 [M:Alt-X] 7
Directory 5-7, 14-19, [M:F10] 7
21, 22, 23, 25, [M:F1] 18, 32
28, 31-34 [M:F2,A] 21
Downloading 18, 22, 33, [M:F2,B] 21, 33
34 [M:F2,C] 28, 34
DTR 5, 8, 21 [M:F2,D] 18, 21, 33
Duplex 13, 24, 31 [M:F2,E] 17, 33
Entry# 15 [M:F2,F] 21, 31
EOL 2, 17, 31, 35 [M:F2,G] 21, 34
Exiting COMX 7 [M:F2,H] 15, 30
File Compression 4, 42 [M:F2,I] 22
Graphics Character [M:F2,J] 22, 34
Display 12, 31 [M:F2,K] 23
Help 4, 7, 23, 31 [M:F2,L] 23
Hercules 1, 8 [M:F2,M] 22, 32
44 [M:F2,N] 23, 34 .op plus 36
[M:F2,O,A] 18, 32 .op times 36
[M:F2,O,B] 2, 35 Script Stack Move
[M:F2,O,C] 35 Commands
[M:F2,O,D] 35 .op clear 37
[M:F2,O,F] 34 .op dupe 37
[M:F2,O,H] 17, 31 .op pop 37
[M:F2,O,I] 17, 35, .op push 37
38 .op rotate 37
[M:F2,O,J] 17, 30 .op sub 37
[M:F2,O,L] 32 Serial Port 4, 6, 13,
[M:F2,O,P] 17, 32 14, 21, 24, 30,
[M:F2,O] 18 31, 34, 35
[M:F2] 31 Stack 4, 32, 33,
[M:F3] 17, 20, 30 35-38
[M:F4] 20, 28 Startup Options 7, 20,
[M:F5] 20 21
[M:F6] 20, 21, 34 Status Line 6, 9, 38
[M:F7] 21 Tab 12, 19, 40
[M:F9] 38 Televideo 950 4, 11
[M:PgDn] 15, 18, 31 Terminal Emulation 1,
[M:PgUp] 15, 16, 35 10, 11-13, 21,
Modem 4-7, 9, 12-15, 18, 23, 24, 30, 31,
21, 22-24, 26, 34, 35
30, 31, 39 Transfer Protocol
Monochrome 8, 9 Kermit 9, 16-18,
Mouse 24, 25 21, 32, 34, 35
Parity 6, 35 Modem7 16, 21
Password 4, 23, 28, 33 Xmodem 16
Password Enable 33 Ymodem 16, 17, 21,
Printer 1, 10, 18, 20, 30, 35
21, 22, 25, 33 Uploading 16
Printing 22 VI300 10
Remote Transfer Abort 17 Video 7 26
Script File Tracer 4, 41 Video Mode 12, 13, 25,
Script File Variables 27
$Variable 9, 20, VT100 10, 11, 13, 28
30, 31, 32, 37 VT102 10, 11
Script Jump Commands VT220 4, 10, 11
.op je 29, 30, 38 VT52 10, 11
.op jf 38 Windows 1, 24, 25, 43
.op jn 29, 30, 38 Word Processor 3, 18,
.op jt 38 21, 25, 27, 31
.op ju 29, 30, 38 Wrap Line 12
Script Stack Comparison Xon/Xoff 12, 17, 35, 38
Commands
.op ge 37
.op gt 37
.op le 37
.op lt 37
Script Stack Math
Commands
.op divide 36
.op increment 36
.op minus 36
45
46